package models;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

public class DepartmentManagement {
	private final String DRIVER = "org.postgresql.Driver";
	private final String URL = "jdbc:postgresql://localhost:5432/CourseRegistrationSystem";
	private final String SQL_USER = "postgres";
	private final String SQL_PASS = "dkmh";

	Connection connection;
	PreparedStatement ps;
	ResultSet rs;

	public DepartmentManagement() throws ClassNotFoundException, SQLException {
		Class.forName(DRIVER);
		connection = DriverManager.getConnection(URL, SQL_USER, SQL_PASS);
		String query = "SELECT * FROM department";
		ps = connection.prepareStatement(query);
		rs = ps.executeQuery();
	}
}
